/*
 * @Author: Lijin
 * @Date: 2024-09-10 10:55:22
 * @LastEditors: Lijin
 * @LastEditTime: 2024-09-10 16:17:28
 * @FilePath: \React-musci\src\router\index.tsx
 * @Description:
 *
 * Copyright (c) 2024 by 18323406700, All Rights Reserved.
 */
import React, { lazy } from 'react'
import { RouteObject } from 'react-router-dom'
import { Navigate } from 'react-router-dom'

// import Discover from '@/views/discover'
// import Mine from '@/views/mine'
// import Download from '@/views/download'
// import Focus from '@/views/focus'

const Discover = lazy(() => import('@/views/discover'))
const Recommend = lazy(() => import('@/views/discover/c-views/recommend'))
const Ranking = lazy(() => import('@/views/discover/c-views/ranking'))
const Songs = lazy(() => import('@/views/discover/c-views/songs'))
const Djradio = lazy(() => import('@/views/discover/c-views/djradio'))
const Album = lazy(() => import('@/views/discover/c-views/album'))
const Artist = lazy(() => import('@/views/discover/c-views/artist'))

const Mine = lazy(() => import('@/views/mine'))
const Download = lazy(() => import('@/views/download'))
const Focus = lazy(() => import('@/views/focus'))

const routes: RouteObject[] = [
  {
    path: '/',
    element: <Navigate to="/discover" />,
  },
  {
    path: '/discover',
    element: <Discover />,
    children: [
      {
        path: '/discover',
        element: <Navigate to="/discover/recommend" />,
      },
      {
        path: '/discover/recommend',
        element: <Recommend />,
      },
      {
        path: '/discover/ranking',
        element: <Ranking />,
      },
      {
        path: '/discover/songs',
        element: <Songs />,
      },
      {
        path: '/discover/djradio',
        element: <Djradio />,
      },
      {
        path: '/discover/album',
        element: <Album />,
      },
      {
        path: '/discover/artist',
        element: <Artist />,
      },
    ],
  },
  {
    path: '/mine',
    element: <Mine />,
  },
  {
    path: '/focus',
    element: <Focus />,
  },
  {
    path: '/download',
    element: <Download />,
  },
]

export default routes
